---
id: 657f43d341a0dd17120cdb08
title: ステップ 17
challengeType: 20
dashedName: step-17
---

# --description--

Inside the space you left between the pair of square braces, you can describe the value that you would like to include in the list based on a given condition.

```py
snake_cased_char_list = [
    '_' + char.lower() if char.isupper()
]
```

Python will interpret this expression as "append `'_' + char.lower()` to the list if `char` is in uppercase" and this will convert the case for the capital letters in the input string.

Start by adding this line within the square braces.

# --hints--

You should add `'_' + char.lower() if char.isupper()` within the square braces of `snake_cased_char_list`.

```js
const transformedCode = code.replace(/\r/g, "");
const convert_to_snake_case = __helpers.python.getDef("\n" + transformedCode, "convert_to_snake_case");
const { function_body } = convert_to_snake_case;

assert.match(function_body, / +snake_cased_char_list\s*=\s*\[\s*("|')_\1\s*\+\s*char\.lower\(\s*\)\s+if\s+char\.isupper\(\s*\)\s*\]/);
```

# --seed--

## --seed-contents--

```py
def convert_to_snake_case(pascal_or_camel_cased_string):
    # snake_cased_char_list = []
    # for char in pascal_or_camel_cased_string:
    #     if char.isupper():
    #       converted_character = '_' + char.lower()
    #       snake_cased_char_list.append(converted_character)
    #     else:
    #         snake_cased_char_list.append(char)
    # snake_cased_string = ''.join(snake_cased_char_list)
    # clean_snake_cased_string = snake_cased_string.strip('_')

    # return clean_snake_cased_string

--fcc-editable-region--
    snake_cased_char_list = [

    ]
--fcc-editable-region--



def main():
    print(convert_to_snake_case('aLongAndComplexString'))

if __name__ == '__main__':
    main()
```
